package StudyCode.summary.regularexpressionsmatch;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingEscapesInRegularExpressionsWithABackslash {
	public static void main(String[] args) {
		Pattern pattern = Pattern.compile("\\(\\d{3}\\) \\d{3}-\\d{4}");
		Matcher matcher = pattern.matcher("(779) 148-1212");
		if (matcher.matches())
			System.out.println("匹配到.");
		else
			System.out.println("未匹配到.");
	}

}
